< previous page page_545 next page >

Page 545
(table continued from previous page)
ControlNameCaptionStyle
Command6cmdIconLoad Icon intoGraphical
Command button
Picture1picBitmapN/AN/A
Label1lblString(blank)N/A

Now add the resource file to the project. Right-click in the Project window, select the Add option, and then select Add Resource File to display the Open a Resource File dialog box. Locate the resource file that you just created and select it. It's now displayed in the project window in the group Related Documents (see Figure 19.8).
12181-0545a.gif
Figure 19.8.
Confirming that the resource
file has been added correctly
to the project.
You can use three commands to retrieve specific resources from the file. The syntax of each command is discussed in the following sections.
LoadResString
Lblprompt.caption = LoadResString(index)
The required index parameter can be an integer value or a string that specifies the identifier (ID) of the data in the resource file.
LoadResPicture
PicFrame.Picture = LoadResPicture(index, format)
The required index parameter can be an integer value or a string that specifies the identifier (ID) of the data in the resource file.
The format parameter is also required. The value or constant specifies the format of the data being returned, as follows:
vbResBitmap
0
Bitmap resource
vbResIcon
1
Icon resource
vbResCursor
2
Cursor resource

 
< previous page page_545 next page >

If you like this book, buy it!